#include "stdafx.h"

#pragma once

namespace HandBanana { namespace Core { namespace Graphics
{
    /// <Summary>
    /// The abstract Sprite class represents a 2D object with a given Size, Location and Texture drawn by the Renderer
    /// </Summary>
    public ref class Sprite sealed
    {
    // Constructors
    public:

        /// <summary>
        /// Create a new instance of the Sprite class
        /// </summary>
        Sprite(Texture^ argTexture);

    // Public Properties
    public:

        /// <summary>
        /// Gets the X position of the Sprite
        /// </summary>
        property float X
        {
            float get(void);
            void set(float value);
        }

        /// <summary>
        /// Gets the Y position of the Sprite
        /// </summary>
        property float Y
        {
            float get(void);
            void set(float value);
        }

        /// <summary>
        /// Gets the Width of the Sprite
        /// </summary>
        property float Height
        {
            float get(void);
            void set(float value);
        }

        /// <summary>
        /// Gets the Height of the Sprite
        /// </summary>
        property float Width
        {
            float get(void);
            void set(float value);
        }

        /// <summary>
        /// 
        /// </summary>
        property D3DXCOLOR ColorModulation
        {
            D3DXCOLOR get(void);
            void set(D3DXCOLOR value);
        }

        /// <summary>
        /// Gets or sets the Frame of the Texture to drawn
        /// </summary>
        property int Frame
        {
            int get(void);
            void set(int value);
        }

        /// <summary>
        /// Gets or sets the visibility of the Sprite
        /// </summary>
        property Boolean Visible
        {
            Boolean get(void);
            void set(Boolean value);
        }

        /// <summary>
        /// Gets or sets the opacity of the Sprite
        /// </summary>
        property float Opacity
        {
            float get(void);
            void set(float value);
        }

        /// <summary>
        /// Gets or sets the Sprite Texture
        /// </summary>
        property Resources::Texture^ Texture
        {
            Resources::Texture^ get(void);
        }

    // Private Data Members
    private:

        // Static Logger for this Class
        static NLog::Logger^            smLogger = NLog::LogManager::GetCurrentClassLogger();
        float                           mX, mY, mWidth, mHeight;
        Resources::Texture^             mTexture;
        int                             mFrame;
        float                           mOpacity;
        Boolean                         mVisible;
        float                           mColorModulationR;
        float                           mColorModulationG;
        float                           mColorModulationB;
        float                           mColorModulationA;

    };
} } }